package cn.tedu.bonfire.admin.account.dao.persist.repository.impl;


import cn.tedu.bonfire.admin.account.dao.persist.mapper.UserRoleAndLogMapper;
import cn.tedu.bonfire.admin.account.dao.persist.repository.IUserAndLogRepository;
import cn.tedu.bonfire.admin.account.pojo.dto.AdminDateTimeLogDTO;
import cn.tedu.bonfire.admin.account.pojo.vo.UserLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class IUserAndLogRepositoryImpl implements IUserAndLogRepository {


    @Autowired
    private UserRoleAndLogMapper userRoleAndLogMapper;


    /**
     * 查询用户操作日志
     * @return
     */
    @Override
    public List<UserLogVO> selectUserLog() {
        return userRoleAndLogMapper.selectUserLog();
    }

    /**
     * 根据时间范围查询用户操作日志
     * @param adminDateTimeLogDTO
     * @return
     */
    @Override
    public List<UserLogVO> selectUserTimeLog(AdminDateTimeLogDTO adminDateTimeLogDTO) {
        return userRoleAndLogMapper.selectUserTimeLog(adminDateTimeLogDTO);
    }
}
